var XML = require('./ObjTree.js');
var xotree = new XML.ObjTree();

var inputdata = '{"business":{"company":["Code Blog"],"owner":["Nic Raboy"],"employee":[{"firstname":["Nic"],"lastname":["Raboy"]},{"firstname":["Maria"],"lastname":["Campos"]}]}}';
var xml = xotree.writeXML(JSON.parse(inputdata));
console.log(xml);
console.log(replaceXMLBlank(xml));

function replaceXMLBlank(str) {
  str = str.replace(/(^\s*)|(\s*$)/g, "");
  return str.replace(/[\r\n\t]/g, ""); //去掉回车换行
}
